<script>
  // 判断本地储存中是否有token，如果没有，跳转到login.html
  if(localStorage.getItem('token') === null) {
    location.href = './login.html';
  }
</script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>后台大布局</title>
  <link rel="stylesheet" href="./assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="./assets/lib/index.css">
</head>
<body>

  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo">后台管理系统</div>
      <!-- 头部区域（可配合layui已有的水平导航） -->
      
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <a href="javascript:;">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            <span class="username">黑马</span>
          </a>

          
        </li>
        <li class="layui-nav-item"><a href="" id="rmv">退出</a></li>
      </ul>
    </div>
    
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
          <li class="layui-nav-item layui-this"><a href=""><span class="iconfont icon-home">首页</span></a></li>
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;">用户管理</a>
            <dl class="layui-nav-child">
              <dd><a href="./user/user.html" target="fm">用户列表</a></dd>
              <dd><a href="./user/add.html" target="fm">添加用户</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">资源管理</a>
            <dl class="layui-nav-child">
              <dd><a href="./link/link.html" target="fm">友情链接</a></dd>
              <dd><a href="./swiper/swiper.html" target="fm">轮播图</a></dd>
              <dd><a href="./comment/comment.html" target="fm">评论管理</a></dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>
    
    <div class="layui-body">
      <iframe src="./home/home.html" frameborder="0" name="fm"></iframe>
    </div>
    
    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © layui.com - 底部固定区域
    </div>
  </div>

<script src="./assets/lib/layui/layui.all.js"></script>
<script src="./assets/lib/jquery.js"></script>
<script src="./assets/js/common.js"></script>
<script src="./assets/js/index.js"></script>
</body>
</html>